$(document).ready(function(){
    $("#iframe-div").css('height',$(window).height()-55);
    $(window).resize(function (event) {
        $("#iframe-div").height($(window).height() - 100);
    });
    $("#sidebarOpen").on('click',function(){
        var left=$(".sidebar-nav").css('left');
        var leftWidth=left.substr(0,(left.length-2));
        if(leftWidth=='0'){
            $(this).removeClass('sidebar-open').addClass('sidebar-close');
            $(".sidebar-nav").animate({left:'-240px'},300);
            $(".content-main").animate({marginLeft:0},300);
        }else{
            $(this).removeClass('sidebar-close').addClass('sidebar-open');
            $(".sidebar-nav").animate({left:0},300);
            $(".content-main").animate({marginLeft:'240px'},300);
        }
    })
    /*下拉*/
    $('.nav-list li').on('click',function(event){
        event.stopPropagation();
        var shut=$(this).children('.second-box');
        var type=shut.css('display');
        if($(this).has('.second-box') && type=='none'){
            $(this).children('.second-box').slideDown();
            $(this).find('i.fa').removeClass('fa-angle-right').addClass('fa-angle-down');
        }else if($(this).children('.second-box') && type=='block'){
            $(this).children('.second-box').slideUp();
            $(this).find('i.fa').removeClass('fa-angle-down').addClass('fa-angle-right');
        }
    })
})